namespace RawProject
{
	namespace GUI
	{

		class MainWindow : public Gtk::Dialog
		{
		public:
			MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& refGlade);
			virtual ~MainWindow();

		protected:
			// Signal handlers:
			bool LoadImage(Glib::ustring &);
			void on_open_document();
			void on_close_document();
			void on_save();
			void on_quit();
			bool darea_on_expose_event(GdkEventExpose* );
			bool darea_motion_event(GdkEventMotion * );
			void on_apply_clicked();
			void on_restore_clicked();
			bool on_my_event(GdkEvent* );
                        void on_my_data_received(
                            const Glib::RefPtr<Gdk::DragContext>& , int, int,
                            const Gtk::SelectionData& , guint, guint );

			// Attributes
			unsigned char * m_imgbuffer;
			Glib::RefPtr<Gtk::Builder> m_refGlade;
			Gtk::DrawingArea* m_dareaImage;
			Gtk::Statusbar* m_statusBar;
			int m_contextId;
			RawImage m_image; // Image to draw in the Drawing area

			// Relative to Tone Mapping
			Gtk::HScale * m_scaleSize;
			Gtk::Button * m_buttonApply;
			Gtk::Button * m_buttonRestore;
		};
	}
}
